<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<?php
    $EmailVendedor = 'mario@liteci.com.br';
    $id = $_GET['idp'];
    $query = "SELECT * FROM tbcr WHERE id ='".$id."'";
    $exec  = mysql_query($query);
    $resultados = mysql_fetch_array($exec);
    $chave    = $resultados[1];
    $prc      = $resultados[2];
    $codcli   = $resultados[11];
    $dtvenc   = $resultados[4];
    $resta    = $resultados[15];
    $resta    = $resta.'.00';    
    $dtAtual  = date('d/m/y');
    $status   =$resultados[8];
    $query2   = "SELECT * FROM tbempresa WHERE codempresaliteci ='".$_SESSION['codcli']."'";
    $ex = mysql_query($query2);
    $res = mysql_fetch_array($ex);    
    $nome     = $res[1];
    $cep      = $res[10];
    $endereco = $res[6];
    $num      = $res[7];
    $bairro   = $res[8];
    $cidade   = $res[9];
    $uf       = $res[11];
    $tel      = $res[12];
    $email    = $res[17];
    $refe = $chave.'|'.$prc.'|'.$codcli.'|'.$resta;
    $refe = $refe.'|'.md5($chave.$prc.$codcli.$resta.'liteciaugusto');   
    $ddd=  substr($tel,1,2);
    $tel= substr($tel,3,8)
    ?>

<div id="rightContent">
<form name="form1" target="_self"  action="https://pagseguro.uol.com.br/security/webpagamentos/webpagto.aspx" method="post" id="TestePS" />

<input type="hidden" name="email_cobranca" value="<?php echo $EmailVendedor; ?>">
<input type="hidden" name="tipo" value="CP" />
<input type="hidden" name="moeda" value="BRL" />
<input type="hidden" name="ref_transacao" value="<?php echo $refe; ?>" />

 
<input type="hidden" name="item_id_1" value="<?php echo '01'; ?>" />
<input type="hidden" name="item_descr_1" value="<?php echo'Mensalidade'; ?>" />
<input type="hidden" name="item_quant_1" value="<?php echo '1'; ?>" />
<input type="hidden" name="item_valor_1" value="<?php echo $resta ?>" />
<input type="hidden" name="item_frete_1" value="0" />


<input type="hidden" name="cliente_nome" value="<?php echo $nome; ?>" />

<input type="hidden" name="cliente_cep" value="<?php echo $cep;?>" />
<input type="hidden" name="cliente_end" value="<?php echo $endereco; ?>" />
<input type="hidden" name="cliente_num" value="<?php echo $num; ?>" />
<input type="hidden" name="cliente_bairro" value="<?php echo $bairro; ?>" />
<input type="hidden" name="cliente_cidade" value="<?php echo $cidade;?>" />
<input type="hidden" name="cliente_uf" value="<?php echo $uf; ?>" />
<input type="hidden" name="cliente_pais" value="BRA" />
<input type="hidden" name="cliente_ddd" value="<?php echo $ddd;?>"/>

<input type="hidden" name="cliente_tel" value="<?php echo $tel; ?>" />
<input type="hidden" name="cliente_email" value="<?php echo $email;?>" />
</form>
<script language="JavaScript">     
    form1.submit();                
</script>    
  </div>
  
    
		
		